#include "AppRuntime.h"
#include "hilog/log.h"

namespace Babylon
{
    void AppRuntime::DefaultUnhandledExceptionHandler(const Napi::Error& error)
    {
        unsigned int domain = 0x4A53;
        OH_LOG_Print(LOG_APP, LOG_ERROR, domain, "BabylonNative", "[Uncaught Error] %{public}s", Napi::GetErrorString(error).data());
    }

    void AppRuntime::RunPlatformTier()
    {
        RunEnvironmentTier();
    }

    void AppRuntime::Execute(Dispatchable<void()> callback)
    {
        callback();
    }
}
